// components/TextInput.js
import React from 'react';
import { TextInput, StyleSheet, KeyboardTypeOptions } from 'react-native';

const CustomTextInput = ({
  value,
  onChangeText,
  placeholder,
  secureTextEntry,
  keyboardType,
}: {
  value: string,
  onChangeText: (text: string) => void,
  placeholder: string,
  secureTextEntry: boolean,
  keyboardType: string,
}) => (
  <TextInput
    value={value}
    onChangeText={onChangeText}
    placeholder={placeholder}
    secureTextEntry={secureTextEntry}
    keyboardType={keyboardType as KeyboardTypeOptions}
    style={styles.input}
  />
);

const styles = StyleSheet.create({
  input: {
    height: 50,
    borderColor: '#ccc',
    borderWidth: 1,
    borderRadius: 5,
    paddingHorizontal: 15,
    marginVertical: 10,
  },
});

export default CustomTextInput;
